﻿/********************************************************************************************************************
* Author:	Christos Polydorou																						*
* Email:	std04237@di.uoa.gr																						*
* Purpose:	This script is used in order to create the administrator user with username: "admin" and				*
* password "admin".																									*
********************************************************************************************************************/

DECLARE @count int

SELECT @count = COUNT(*)
FROM Users
WHERE Users.Username = 'admin'

IF @count < 1
	INSERT INTO Users
	VALUES('admin','admin','noreply@localhost','adm','1',DATEADD(MINUTE,-100,GETDATE()),'0',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,'administrator','administrator')